$(function () {
    $("body").on('click','#open-two-agent',function () {//同意开通
        var shareKey = $("#shareKey").val();
        $.ajax({
            url:baseloaction +'/mobile/uc/agent/openTwoAgent',
            type:'post',
            dataType:'json',
            data:{
                'shareKey':shareKey
            },
            success:function (result) {
                if(result.success==true){
                    window.location.href = baseloaction +'/mobile/uc/agent/agentUserInfo';
                }else{
                    $.toast(result.message);
                }
            },
            error:function (error) {
                $.toast('系统错误，操作失败');
            }
        });
    });
});